import React, { Component } from 'react'
import Fun from './fun';
class App2 extends Component {
  componentDidMount() {
      console.log(this.myref);
  }
  render() {
    return (
      <div>
          <span ref={(ref)=>this.myref = ref}>1111</span>
          <Fun></Fun>
      </div>
    )
  }
}

export default App2